import axios from 'axios';
import { RoleType } from '@/store/modules/user/types';

export interface PersionInfo {
  userId: number;
  userName: string;
  name: string;
  avatar: string;
  region: string;
  jobNumber: string;
  email: string;
  mobile: string;
  role: RoleType;
}

export function getUserInfo() {
  return axios.post<PersionInfo>('/api/profile/info');
}

export function submitPesionForm(data: any) {
  return axios.post<PersionInfo>('/api/profile/savePersion', data);
}
